<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>
    <link href="./lib/bootstrap/css/bootstrap.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="./lib/html5shiv/html5shiv.min.js"></script>
    <script src="./lib/respond/respond.js"></script>
    <![endif]-->
</head>
<body>
<style>
    .mobileImg{
        width: 100%;
        display: block;
    }
    .mobileImg > img{
        width: 100%;
        display: block;
    }
    .pcImg{
        width: 100%;
        height: 410px;
        display: block;
        /*设置背景图片了*/

        /*设置图片居中显示*/
        background-position: center center;
        /*设置背景图片的大小*/
        background-size: cover;
    }
</style>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        <li data-target="#carousel-example-generic" data-slide-to="3"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        <div class="item active">
            <!--移动端-->
            <a href="javascript:;" class="mobileImg hidden-sm hidden-md hidden-lg">
                <img src="./images/slide_01_640x340.jpg" alt="...">
            </a>
            <!--非移动端-->
            <a href="javascript:;" class="pcImg hidden-xs" style="background-image: url('./images/slide_01_2000x410.jpg');"></a>
        </div>
        <div class="item">
            <a href="javascript:;" class="mobileImg  hidden-sm hidden-md hidden-lg">
                <img src="./images/slide_02_640x340.jpg" alt="...">
            </a>
            <a href="javascript:;" class="pcImg  hidden-xs" style="background-image: url('./images/slide_02_2000x410.jpg');"></a>
        </div>
        <div class="item">
            <a href="javascript:;" class="mobileImg  hidden-sm hidden-md hidden-lg">
                <img src="./images/slide_03_640x340.jpg" alt="...">
            </a>
            <a href="javascript:;" class="pcImg  hidden-xs" style="background-image: url('./images/slide_03_2000x410.jpg');"></a>
        </div>
        <div class="item">
            <a href="javascript:;" class="mobileImg  hidden-sm hidden-md hidden-lg">
                <img src="./images/slide_04_640x340.jpg" alt="...">
            </a>
            <a href="javascript:;" class="pcImg  hidden-xs" style="background-image: url('./images/slide_04_2000x410.jpg');"></a>
        </div>
    </div>
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div>
<script src="./lib/jquery/jquery.min.js"></script>
<script src="./lib/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>